home *** CD-ROM | disk | FTP | other *** search
- Path: news.mira.net.au!news
- From: davidw@werple.net.au (David White)
- Newsgroups: comp.lang.c++
- Subject: Re: Help Please
- Date: 31 Mar 1996 07:58:17 +1000
- Organization: Werple Internet, Melbourne
- Message-ID: <4jkapp$heu@werple.net.au>
- References: <4ji7eo$kgm@daisy.flex.com.au>
- NNTP-Posting-Host: werplez.mira.net.au
-
- cobweb@flex.com.au (Tony L) writes:
-
- > if (last2 == him)
- > { printf("you have voted for Paul Keating!"); }
- > else
- > { printf("\nYou didn't vote for Paul Keating!"); }
-
- This 'if' compares the address of 'last2' with the address of 'him'; it
- doesn't compare the contents. You need 'if(!strcmp(last2, him))'.
-
- David White
- davidw@werple.mira.net.au
-
-